1. Field of the Invention
The present invention relates to an improvement to the Microsoft® Windows® family of operating systems, and in particular, improvements to Microsoft® Windows Vista™ print driver technology.
2. Description of the Related Art
Recently, Microsoft Corporation has introduced the Microsoft® Windows Vista™ operating system. Windows Vista™ uses two print paths (or drivers) for processing print jobs including the XML Paper Specification (XPS) print path and the Graphics Device Interface (GDI) print path. The XPS print path implements a filter based XPSDrv print driver. Both print paths are present in the Windows Vista™ print subsystem which includes conversion routines that convert print jobs from one print path to the other. These drivers can be used to print from a Win32® application or Windows Presentation Foundation (WPF) application.
The XPSDrv print driver and print path processing are described in greater detail in the Microsoft® Windows® whitepaper entitled “The XPSDrv Filter Pipeline”, published Nov. 3, 2005 (see http://www.microsoft.com/whdc/device/print/XPSDRV_FilterPipe.mspx). Moreover, an overview of printing enhancements enabled by XPS are described in greater detail in the Microsoft® Windows® whitepaper entitled “XPS and Color Printing Enhancements in Microsoft® Windows Vista™”, published Sep. 1, 2005 (see http://www.microsoft.com/whdc/xps/vista_print.mspx).
Print Paths in Windows Vista™
FIG. 1 illustrates system components of the conventional print paths now provided in Windows Vista™. A print subsystem 6 is provided with an XPS to GDI conversion unit 8, a GDI to XPS conversion unit 10, an XPS spool 14, XPSDrv driver 18, EMF spool 12, and GDI/DDI driver 16. A Win32 application 2 starts a print job in the GDI print path 5. In the XPS print path 3, a Windows Presentation Foundation (WPF) application 4 starts the print job. Once an application submits a print job to the GDI/DDI driver 16, it may be processed and routed to a PDL-based device 20 for printing. Otherwise, when an application submits a print job to the XPSDrv driver 18, it may be routed to an XPS document-based 22 device for printing.
The print subsystem 6 in Windows Vista™ implements the XPS print path 3 that supports the XPS spool file 14 and the WPF based graphics engine. The GDI print path 2 (from Windows XP), which uses the GDI/DDI based print driver 16, is also still available in Windows Vista™. Moreover, FIG. 1 shows the additional built-in conversion capabilities that allow Microsoft Win32® GDI-based applications 2 to print to XPS document devices 22 and that allow WPF applications 4 to print to legacy printers 20. As a result, both Win32 and WPF applications 2, 4 can print to either type of printer driver 16, 18.
As shown in FIG. 1, if the Win32 application 4 prints to the XPSDrv driver 18, GDI-DDI calls are converted to XPS spool data before being sent to the XPSDrv Driver 18. On the other hand, if WPF application 4 prints to GDI/DDI driver 16, XPS based spool data is converted to EMF that will be fed to an EMF print processor to generate PDL output for a PDL-based device 20.
FIG. 2 illustrates a side-by-side comparison of the conventional XPS print path 3 and the conventional GDI print path 5 in Windows Vista and how the print subsystem 6 processes print jobs. Print jobs that are sent to a print queue with an XPSDrv printer driver 18 are spooled by print spooler 24 in the XPS spool file format 14 and processed in the XPS print path 3 by print filter pipeline service 28. Print jobs that are sent to the print queue with a GDI-based, Version-3 printer driver 16 are spooled by print spooler 24 in the EMF spool file format and processed in the GDI print path 5 by GDI print subsystem 27.
Now referring to FIG. 2, the print subsystem 6 further includes print spooler 24 which services the GDI print path 5 and the XPS print path 3, respectively. The architecture of the GDI/DDI driver 16 print path 5 includes GDI print subsystem 27 which includes printer graphics DLL Version 3 print driver 42, an EMF print processor 38 and a GDI rendering engine 40. The architecture of the XPSDrv driver 18 print path 3 includes a print filter pipeline service, filter configuration file 32 and a filter pipeline manager 30 which includes various filters for individualized tasks Filter A, Filter B, Filter n . . . and so on.
Conversion routines are performed by XPS to GDI conversion unit 8 and GDI to XPS conversion unit 10 so that Win32 applications 2 can print to an XPS printer 36 with XPSDrv printer driver 18 and WPF applications 4 can print to a GDI printer 34 with the GDI-based printer driver 16. When Win32 application 2 submits the print job to the spooler, the print subsystem determines whether the print job from the application 2 must be converted before spooling although the type of the printer driver 16, 18 of the target print queue determines which print path 3, 5 is supported. If the application's presentation technology differs from that of the print path 3, 5 supported by the driver 16, 18, the print job format must be converted by the XPS to GDI conversion unit 8 and GDI to XPS conversion unit 10 which convert between the XPS and the GDI print paths 3, 5.
XPS-to-GDI Conversion Path
FIG. 3 illustrates the conventional XPS-to-GDI conversion path 7 (see also FIG. 1). XPS documents that are sent to a printer 34 with a GDI-based printer driver 16 are converted by the XPS-to-GDI conversion (XGC) module 8 that is part of the WPF print support 11. In particular, FIG. 3 shows how the WPF print support 11 processes documents for printers 34, 36 based on the type of printer driver. The application 4 prints the document by using the WPF print support 11. Moreover, when printing to a GDI-based printer driver 16, the XGC 8 simulates a Win32-based application and makes GDI calls to the GDI functions that are required to spool the document for the GDI-based print path 5.
If the job is submitted from WPF application 4, underneath, WPF print support 11 checks the driver type, if it is an XPSDrv driver 18, then the job is serialized to print pipeline service 28 and further processed by the XPSDrv filters 30.
GDI-to-XPS Conversion Path
FIG. 4 illustrates the GDI-to-XPS conversion path 9 (see FIG. 1). When a Win32 application 2 sends a document to a printer 36 with an XPSDrv printer driver 18, the spooler 24 uses the GDI-to-XPS conversion (GXC) unit 10 to create an XPS spool file 14 for the XPS print path 3 from the application that calls the GDI functions.
When the print job is submitted from a Win32 application 2, the type of the printer driver is checked. If it is an XPSDrv driver 18, GDI to XPS converter 10 (also referred to as MXDX) is used to convert GDI/DDI calls into XPS spool data 14 and then the print job is fed to print filter pipeline service 28.
Although the aforementioned conversions between XPS and EMF or vice versa are acceptable solutions, one drawback of this approach is that the conversions take processing time. In particular, these data conversions create unwanted latency with regard to the performance of the printing process. Since most of the printers out in the market do not support XPS natively, it is totally redundant to convert EMF into XPS, and again converting XPS into device-specific PDL data at the renderer filter.
Therefore, it would be advantageous to eliminate the conversion from XPS to GDI or from GDI to XPS in an effort to improve the performance of printing from the Win32 application 2 as well as provide rich XPS printing from a WPF application 4.